﻿using System;
using Fee.ViewModel;

namespace Fee.Orders.ViewModel
{
    public class ConstructionDetailSimpleViewModel
    {
        public ConstructionDetailSimpleViewModel()
        {
        }

        public ConstructionDetailSimpleViewModel(ConstructionDetail detail)
        {
            if (detail == null) throw new ArgumentNullException(nameof(detail));
            ContractType = detail.ContractType;
            Contract = new FrameworkContractSimpleViewModel(detail.Contract);
            ConstructionType = detail.ConstructionType;
            Id = detail.Id;
            Project = new ProjectSimpleViewModel(detail.Project);
            Status = detail.Status;
        }
        public ConstructionDetailStatus Status { get; set; }
        public int Id { get; set; }

        public ConstructionType ConstructionType { get; set; }

        public FrameworkContractSimpleViewModel Contract { get; set; }

        public ProjectSimpleViewModel Project { get; set; }
        public ContractType ContractType { get; set; }
    }
}